package cn.powertime.evaluation.service.impl;

import cn.powertime.evaluation.entity.CpsAutomaticTopic;
import cn.powertime.evaluation.mapper.CpsAutomaticTopicMapper;
import cn.powertime.evaluation.service.CpsAutomaticTopicService;
import cn.powertime.evaluation.vo.RespTopicListVo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户智能练习结果表 服务实现类
 * </p>
 *
 * @author liqi
 * @since 2019-09-23
 */
@Service
public class CpsAutomaticTopicServiceImpl extends ServiceImpl<CpsAutomaticTopicMapper, CpsAutomaticTopic> implements CpsAutomaticTopicService {

    @Autowired
    private CpsAutomaticTopicMapper automaticTopicMapper;

    @Override
    public List<RespTopicListVo> automaticTopicList(Long automaticId) {
        return this.automaticTopicMapper.selectAutomaticTopicList(automaticId);
    }

    @Override
    public void updateAutomaticTopic(Long automaticId, Long topicId, String userAnswer) {
        this.automaticTopicMapper.updateAutomaticTopic(automaticId, topicId, userAnswer);
    }
}
